The subject matter disclosed herein generally relates to timestamps and, more particularly, to synchronizing timestamps to avoid execution stalls in processor cores.
Programs often need access to a clock. For example, besides being used to determine the actual time of day, the clock can also be used to order a sequence of events, such as e.g. financial transactions. To allow a clock to be used in that way, the clock has to keep running “forward,” i.e. two reads of the clock never result in the same value, and the “later” clock read has to generate a later (larger) clock value.
In processor architecture, such a clock can be defined as a binary value, e.g. a 64-bit value, where a certain bit position defines a known fixed timed increment. For example, bit 32 could be defined as a one second time increment. More significant bits would indicate larger time increments, while less significant bits smaller increments.
In a multicore system that includes a plurality of processing cores, it is possible for more than one core to simultaneously generate a timestamp with the same time value. Further, other timestamp generation issues can arise when processor cores generate timestamps within close time proximity of each other without taking into account storing and retrieving time requirements. Accordingly, to make sure that a timestamp is correctly generated, a processor core may request a timestamp from shared memory and will stall execution until the requested timestamp is received. Once received, the timestamp generated and the retrieved timestamp value can be resolved through adjustment and delay. However, such an execution stall of a processor core, because of timestamp issues, can cause time delays and therefore loss of performance and execution speed of the core and overall system and processes being executed.
Accordingly, improvements to the system and/or method for handling timestamps are desired.